//
//  HomeMessagePageViewController.m
//  CarUser
//
//  Created by 王森林 on 2018/12/6.
//  Copyright © 2018年 王森林. All rights reserved.
//

#import "HomeMessagePageViewController.h"
#import "HomeMessageViewcontroller.h"
@interface HomeMessagePageViewController()

@end



@implementation HomeMessagePageViewController

- (void)viewDidLoad
{
    
    self.titleColorSelected =RGB(255, 255, 255);
    self.titleColorNormal =  RGB(195, 195, 195);
    self.progressViewCornerRadius = 5;
    self.progressViewBottomSpace = 5;

    [super viewDidLoad];
    self.menuView.backgroundColor = Common_HeadTitle_Color;
    
    self.title = @"消息";
//    [self setNaviDefaultRightBtnWithTitle:@"全标已读" andSel:@selector(handleNavRightAction)];

//    self.titleFontName = FONT_SIZE(14);
    
}

//-  (void)handleNavRightAction
//{
//    
//    
//}


#pragma mark - WMPageControllerDataSource
- (NSInteger)numbersOfChildControllersInPageController:(WMPageController *)pageController {
    return 2;
}

- (UIViewController *)pageController:(WMPageController *)pageController viewControllerAtIndex:(NSInteger)index {
    HomeMessageViewcontroller *control = [[HomeMessageViewcontroller alloc] init];
    switch (index) {
        case 0:
        {
             control.type = @"4";
        }
            break;
        case 1:
        {
              control.type = @"5";
        }
            break;
            
            
        default:
        {
            control.type = @"4";
        }
            break;
    }
    return control;
    
}

- (NSString *)pageController:(WMPageController *)pageController titleAtIndex:(NSInteger)index {
    switch (index) {
        case 0:
            return @"通知";
            break;
        case 1:
            return @"广播";
            break;
            
        default:
            return @"";
            break;
    }
}

- (CGRect)pageController:(WMPageController *)pageController preferredFrameForContentView:(WMScrollView *)contentView{
//    return _contentFrame;
    
    return CGRectMake(0, 45, BOUNDWIDTH, BOUNDHEIGHT -45);
}

- (CGRect)pageController:(WMPageController *)pageController preferredFrameForMenuView:(WMMenuView *)menuView{
//    menuView.scrollView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
//    return _menuFrame;
    
    return CGRectMake(0, 0, BOUNDWIDTH, 45);
}

- (void)pageController:(WMPageController *)pageController lazyLoadViewController:(__kindof UIViewController *)viewController withInfo:(NSDictionary *)info {
    //    NSLog(@"%@", info);
}

- (void)pageController:(WMPageController *)pageController willEnterViewController:(__kindof UIViewController *)viewController withInfo:(NSDictionary *)info {
    //    NSLog(@"%@", info);
}


- (void)pageController:(WMPageController *)pageController didEnterViewController:(__kindof UIViewController *)viewController withInfo:(NSDictionary *)info {
    //    NSLog(@"%s", __FUNCTION__);
}

- (void)menuView:(WMMenuView *)menu didLayoutItemFrame:(WMMenuItem *)menuItem atIndex:(NSInteger)index {
    //    NSLog(@"%@", NSStringFromCGRect(menuItem.frame));
}

@end
